import API from "@/utils/request";

export function getPageCollect({pageNum,pageSize,name}){
    return API.get('/collect/page',{
        params:{
            pageNum,
            pageSize,
            name
        }
    })
}

//前台获取地址列表
export function getPageCollectFront({pageNum,pageSize,name}){
    return API.get('/collect/page/front',{
        params:{
            pageNum,
            pageSize,
            name
        }
    })
}

export function getAllCollect(){
    return API.get('/collect')
}

export function getCollectById(id){
    return API.get(`/collect/${id}`)
}

export function saveCollect(collect){
    return API.post('/collect',collect)
}

export function updateCollect(collect){
    return API.put('/collect',collect)
}

export function removeCollect(id){
    return API.delete(`/collect/${id}`)
}